<template>
  <div>
    <div class="care">
      <span>
        <img src="../../../Img/03.jpg" alt="" />
      </span>
      <span>
        <span>张三</span>
        <el-dropdown style="font-size: 12px; margin-left: 10px">
          <i
            @click="open"
            class="el-icon-setting"
            style="margin-right: 15px"
          ></i>
          <span></span>
        </el-dropdown>
      </span>
    </div>
    <el-menu router>
      <el-menu-item index="/Admin/xinxi">个人信息</el-menu-item>
      <el-menu-item index="/Admin/care">禁止访问</el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    open() {
      this.$confirm("您确定要退出, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.$router.push("/home");
        })
        .catch(() => {
          this.$message({
            message: "欢迎你回来，不许再走喽",
            type: "success",
          });
        });
    },
  },
};
</script>

<style lang="scss" scoped>
.care {
  padding: 10px;
  background-color: #666;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.care img {
  width: 80px;
  border-radius: 50px;
}
</style>